@extends('admin::layouts.master')
@section('content')
    <div class="modal-header">
        <h3 id="ModalLabel">{{ $title }}</h3>
        <!-- check for login error flash var -->
        @if (Session::has('flash_error'))
        <div id="flash_error">{{ Session::get('flash_error') }}</div>
        @endif
    </div>
    <div class="modal-body">
        {{ Form::open(array('url' => $packageAdmin.'/admin/login', 'method' => 'post', 'role' => 'form' , 'class' => 'form-horizontal' )) }}
        <!-- username field -->
        <div class="form-group">
            {{ Form::label('email', 'Email', array('class' => 'col-sm-5 control-label')) }}
            <div class="col-sm-4">
                {{ Form::text('email', Input::old('email'), array('placeholder' => 'someone@awesome.com', 'class' => 'form-control  input-lg')) }}
                <ul class="flash_error">
                    @foreach($errors->get('email') as $error)
                    <li>{{ $error }}</li>
                @endforeach
                </ul>
            </div>
        </div>

        <!-- password field -->
        <div class="form-group">
            {{ Form::label('password', 'Password', array('class' => 'col-sm-5 control-label')) }}
            <div class="col-sm-4">
                {{ Form::password('password', array('class' => 'form-control  input-lg')) }}
                <ul class="flash_error">
                    @foreach($errors->get('password') as $error)
                    <li>{{ $error }}</li>
                @endforeach
                </ul>
            </div>
        </div>
    </div>
    <!-- submit button -->
    <div class="modal-footer text-center">
       {{ Form::submit('Sign in', array('class' => 'btn btn-primary')) }}
        <button class="btn" data-dismiss="modal" >Cancel</button>
    </div>
    {{ Form::close() }}
    @stop